home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2005 November / WNnov2005.iso / Windows / Indispensables / Movie Collection / MovieCollection5403.exe / {app} / php5 / getimg.php < prev    next >
PHP Script  |  2005-02-23  |  881b  |  26 lines

  1. <?php
  2.  /*
  3. $chemin = $dwn ;
  4. $file = $fil;
  5.  
  6.  if ((!file_exists($chemin)) && (!@fclose(@fopen($chemin, "r")))) die('Erreur:
  7. fichier incorrect'); 
  8.  $filename = stripslashes($chemin); 
  9.  $user_agent = strtolower($_SERVER["HTTP_USER_AGENT"]); 
  10.  header("Content-type: application/force-download"); 
  11.  header(((is_integer(strpos($user_agent,
  12. "msie")))&&(is_integer(strpos("win"))))?"Content-Disposition:
  13. filename=\"$filename\"":"Content-Disposition: attachment; filename=\"$filename\""); 
  14.  header("Content-Description: Telechargement de Fichier"); 
  15.  @readfile($chemin); 
  16. */
  17. $filename="./images/".$_GET["idx"].'.jpg';
  18. if (!file_exists($filename))
  19.    $filename="./images/jaq_vide.gif";
  20. //header("Content-type: application/force-download");
  21. header("Content-type: image/jpeg");
  22. //header("Content-Disposition: attachment; filename=".$filename);
  23. readfile($filename);
  24.  
  25. ?>
  26.